home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / perl5 / auto / RPC / XML / Server / call.al < prev    next >
Encoding:
Text File  |  2008-11-04  |  1.6 KB  |  46 lines

  1. # NOTE: Derived from blib/lib/RPC/XML/Server.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package RPC::XML::Server;
  5.  
  6. #line 1733 "blib/lib/RPC/XML/Server.pm (autosplit into blib/lib/auto/RPC/XML/Server/call.al)"
  7. ###############################################################################
  8. #
  9. #   Sub Name:       call
  10. #
  11. #   Description:    This is an internal, end-run-around-dispatch() method to
  12. #                   allow the RPC methods that this server has and knows about
  13. #                   to call each other through their reference to the server
  14. #                   object.
  15. #
  16. #   Arguments:      NAME      IN/OUT  TYPE      DESCRIPTION
  17. #                   $self     in      ref       Object of this class
  18. #                   $name     in      scalar    Name of the method to call
  19. #                   @args     in      list      Arguments (if any) to pass
  20. #
  21. #   Returns:        Success:    return value of the call
  22. #                   Failure:    error string
  23. #
  24. ###############################################################################
  25. sub call
  26. {
  27.     my ($self, $name, @args) = @_;
  28.  
  29.     my $meth;
  30.  
  31.     #
  32.     # Two VERY important notes here: The values in @args are not pre-treated
  33.     # in any way, so not only should the receiver understand what they're
  34.     # getting, there's no signature checking taking place, either.
  35.     #
  36.     # Second, if the normal return value is not distinguishable from a string,
  37.     # then the caller may not recognize if an error occurs.
  38.     #
  39.  
  40.     return $meth unless ref($meth = $self->get_method($name));
  41.     $meth->call($self, @args);
  42. }
  43.  
  44. # end of RPC::XML::Server::call
  45. 1;
  46.